<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改系统任务')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-task-edit" th:object="${sysOaTask}">
            <input name="taskOutsideId" th:field="*{taskOutsideId}"  type="hidden" >
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">任务编号：</label>
                <div class="col-sm-8">
                    <input name="taskNo" th:field="*{taskNo}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">任务名称：</label>
                <div class="col-sm-8">
                    <input name="taskName" th:field="*{taskName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">任务类型：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_task_type')}">
                        <input type="radio" th:id="${'taskType_' + dict.dictCode}" name="taskType" th:value="${dict.dictValue}" th:field="*{taskType}">
                        <label th:for="${'taskType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">紧急程度：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_oa_task_priority')}">
                        <input type="radio" th:id="${'taskType_' + dict.dictCode}" name="priority" th:value="${dict.dictValue}" th:checked="${dict.default}">
                        <label th:for="${'taskType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">任务内容：</label>
                <div class="col-sm-8">
                    <textarea name="taskContent" class="form-control" rows="7" th:field="*{taskContent}"></textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">任务来源：</label>
                <div class="col-sm-8">
                    <input name="taskSource" th:field="*{taskSource}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">是否创建钉钉待办：</label>
                <div class="col-sm-8">
                    <label class="radio-box"> <input type="radio" name="syncDingtalk" value="0"  checked/> 否 </label>
                    <label class="radio-box"> <input type="radio" name="syncDingtalk" value="1"  /> 是</label>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/task";
        $("#form-task-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-task-edit').serialize());
            }
        }
    </script>
</body>
</html>